import { stringify } from 'qs';
import request from '@/utils/request';

export function fetchList(params) {
    return request(`/v1/goods/list?${stringify(params)}`);
}

export function storeGoods(postData) {
    return request(`/v1/goods/add`, {
        method: 'POST',
        body: postData
    })
}

export function putGoods(putData) {
    return request(`/v1/goods/update`, {
        method: 'PUT',
        body: putData
    })
}

export function delGoods(delData) {
    return request(`/v1/goods/delete`, {
        method: 'DELETE',
        body: delData
    })
}